package org.lboot.idmo.module.dept;


import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lboot.idmo.module.user.SysUser;
import org.lboot.idmo.module.user.SysUserDAO;
import org.lboot.jpa.jpa.AbstractJpaCurd;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author kindear
 * 部门服务默认实现
 */
@Slf4j
@Service
@AllArgsConstructor
public class SysDeptServiceImpl extends AbstractJpaCurd<Long,SysDept,SysDeptDAO> implements SysDeptService{
    SysUserDAO userDAO;
    @Override
    public List<SysDept> getAll() {
        return dao.findAll();
    }

    @Override
    public List<SysUser> getDeptUsers(Long deptId) {
        return userDAO.findByDeptId(deptId);
    }
}